package org.gui.featureSelection;

import java.awt.GridLayout;
import java.util.ArrayList;

import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class WordsWithNumbersPanel extends JPanel{

		private static final long serialVersionUID = 1L;
		
		JCheckBox isSelected;
		JLabel wordWithNumberLabel;
		JTextField wordWithNumberInput;

		
	public WordsWithNumbersPanel(){

		setLayout(new GridLayout(1,2,0,10));
		isSelected = new JCheckBox("Word with number");
		wordWithNumberLabel = new JLabel("Words= ");
		wordWithNumberLabel.setHorizontalAlignment(JLabel.RIGHT);
		wordWithNumberInput = new JTextField();
		add(isSelected);
		add(wordWithNumberLabel);
		add(wordWithNumberInput);		
		
	}
	
	public ArrayList<String> getFeature(){
		
		ArrayList<String> answer = new ArrayList<String>();
		if(isSelected.isSelected()==true){
			answer.add(wordWithNumberInput.getText());
			return answer;
		}
		
		return null;
	}
	
}
